Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fiber] Delete isMounted internals #31966

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

sebmarkbage
Copy link
Collaborator

The public API has been deleted a long time ago so this should be unused unless it's used by hacks. It should be replaced with an effect/lifecycle that manually tracks this if you need it.

The problem with this API is how the timing implemented because it requires Placement/Hydration flags to be cleared too early. In fact, that's why we also have a separate PlacementDEV flag that works differently.

https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberCommitWork.js#L2157-L2165

We should be able to remove this code now.

Copy link

vercel bot commented Jan 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2025 3:28am

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jan 3, 2025
@react-sizebot
Copy link

react-sizebot commented Jan 3, 2025

Comparing: 3b009b4...e650612

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 512.42 kB 512.26 kB = 91.59 kB 91.57 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 517.20 kB 517.04 kB = 92.44 kB 92.42 kB
facebook-www/ReactDOM-prod.classic.js = 594.22 kB 593.89 kB = 104.67 kB 104.62 kB
facebook-www/ReactDOM-prod.modern.js = 584.49 kB 584.32 kB = 103.12 kB 103.09 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.production.js = 5.69 kB 5.44 kB = 1.53 kB 1.48 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.production.js = 5.69 kB 5.44 kB = 1.53 kB 1.48 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.production.js = 5.69 kB 5.44 kB = 1.53 kB 1.48 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.development.js = 6.80 kB 6.00 kB = 1.66 kB 1.48 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.development.js = 6.80 kB 6.00 kB = 1.66 kB 1.48 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.development.js = 6.80 kB 6.00 kB = 1.66 kB 1.48 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-art/cjs/react-art.development.js = 594.02 kB 592.80 kB = 94.86 kB 94.58 kB
facebook-www/ReactTestRenderer-dev.classic.js = 572.97 kB 571.79 kB = 93.50 kB 93.21 kB
facebook-www/ReactTestRenderer-dev.modern.js = 572.97 kB 571.79 kB = 93.50 kB 93.21 kB
oss-stable/react-art/cjs/react-art.development.js = 554.32 kB 553.10 kB = 89.36 kB 89.01 kB
oss-stable-semver/react-art/cjs/react-art.development.js = 554.24 kB 553.02 kB = 89.34 kB 88.99 kB
facebook-www/ReactART-prod.modern.js = 357.10 kB 356.27 kB = 59.80 kB 59.67 kB
facebook-www/ReactART-dev.classic.js = 648.92 kB 647.32 kB = 103.22 kB 102.73 kB
oss-experimental/react-art/cjs/react-art.production.js = 305.56 kB 304.73 kB = 52.20 kB 52.07 kB
oss-stable/react-art/cjs/react-art.production.js = 301.19 kB 300.36 kB = 51.31 kB 51.18 kB
oss-stable-semver/react-art/cjs/react-art.production.js = 301.11 kB 300.28 kB = 51.29 kB 51.16 kB
test_utils/ReactAllWarnings.js = 63.02 kB 62.74 kB = 15.68 kB 15.67 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.production.js = 5.69 kB 5.44 kB = 1.53 kB 1.48 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.production.js = 5.69 kB 5.44 kB = 1.53 kB 1.48 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.production.js = 5.69 kB 5.44 kB = 1.53 kB 1.48 kB
oss-experimental/react-reconciler/cjs/react-reconciler-reflection.development.js = 6.80 kB 6.00 kB = 1.66 kB 1.48 kB
oss-stable-semver/react-reconciler/cjs/react-reconciler-reflection.development.js = 6.80 kB 6.00 kB = 1.66 kB 1.48 kB
oss-stable/react-reconciler/cjs/react-reconciler-reflection.development.js = 6.80 kB 6.00 kB = 1.66 kB 1.48 kB

Generated by 🚫 dangerJS against 435d3c9

Copy link
Collaborator

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove it here as well or update the message to say it has been removed:

isMounted: [
'isMounted',
'Instead, make sure to clean up subscriptions and pending requests in ' +
'componentWillUnmount to prevent memory leaks.',
],

@sebmarkbage sebmarkbage merged commit e30c669 into facebook:main Jan 8, 2025
187 checks passed
github-actions bot pushed a commit that referenced this pull request Jan 8, 2025
The public API has been deleted a long time ago so this should be unused
unless it's used by hacks. It should be replaced with an
effect/lifecycle that manually tracks this if you need it.

The problem with this API is how the timing implemented because it
requires Placement/Hydration flags to be cleared too early. In fact,
that's why we also have a separate PlacementDEV flag that works
differently.

https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberCommitWork.js#L2157-L2165

We should be able to remove this code now.

DiffTrain build for [e30c669](e30c669)
github-actions bot pushed a commit that referenced this pull request Jan 8, 2025
The public API has been deleted a long time ago so this should be unused
unless it's used by hacks. It should be replaced with an
effect/lifecycle that manually tracks this if you need it.

The problem with this API is how the timing implemented because it
requires Placement/Hydration flags to be cleared too early. In fact,
that's why we also have a separate PlacementDEV flag that works
differently.

https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberCommitWork.js#L2157-L2165

We should be able to remove this code now.

DiffTrain build for [e30c669](e30c669)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants